{include file="public/meat" title="添加/编辑用户信息"/}
{include file="public/js" /}
{load href="__EDITOR__/wangEditor.min.js" /}
<script type="text/javascript">
    var E = window.wangEditor;
</script>
<div class="cx-fex-c">
    <div class="x11 pad-t15 pad-b10">
        <div class="cx-fex-c">
            <div class="layout">
                <a href="{:url('xuanyuan')}" class="button bg-blue">返回列表</a>
            </div>
        </div>
    </div>
    <div class="x11">
        <fieldset class="cx-field">
            <legend class="cx-field-legend">添加/编辑用户信息</legend>
            <form class="layui-form" id="addform"  role="form" action="" method="post">
                <h2 class="t-c b-b t-red t-18 mb-20">必填项</h2>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">用户名<span class="t-red">(*)</span></label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" class="ipt" placeholder="请输入用户名" {present name="postdb.username"}disabled{/present} required  lay-verify="required" name="username" value="{$postdb.username|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">用户昵称<span class="t-red">(*)</span> </label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="uniname" class="ipt" placeholder="请输入用户昵称" required  lay-verify="required" value="{$postdb.uniname|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">电子邮箱<span class="t-red">(*)</span> </label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="uemail" class="ipt" placeholder="请输入电子邮箱" {present name="postdb.uemail_yz"}{eq name="postdb.uemail_yz" value="1"}disabled{/eq}{/present} required  lay-verify="required|email" value="{$postdb.uemail|default=''}">
                    </div>
                </div>
                {present name="postdb.upassword"}
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">旧密码</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="password" class="ipt" {present name="postdb.upassword"}disabled value="******"{/present} >
                    </div>
                </div>
                {/present}
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">设置新密码</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="password" name="newpassword" class="ipt" placeholder="如果不更换密码,请留空">
                        <span class="t-gray">如果不更换密码,请留空</span>
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">选择会员组<span class="t-red">(*)</span></label>
                    </div>
                    <div class="xs8 xl9">
                        <select name="group_id" lay-verify="required">
                            <option value="">请选择用户组</option>
                            {volist name="groupid" id="cx"}
                            <option {eq name="postdb.group_id|default=''" value="$cx.id"}selected{/eq} value="{$cx.id}">{$cx.title}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">用户状态<span class="t-red">(*)</span></label>
                    </div>
                    <div class="xs8 xl9">
                        <input name="status" type="radio" value="1" {eq name="$postdb.status|default='1'" value="1"}checked="checked"{/eq} title="已通过">
                        <input name="status" type="radio" value="0" {eq name="$postdb.status|default=''" value="0"}checked="checked"{/eq} title="未通过">
                    </div>
                </div>
                <h2 class="t-c b-b t-gray t-18 mb-20">选填项</h2>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">用户头像</label>
                    </div>
                    <div class="xs8 xl9">
                        <img class="picurlimg b-a" src="{present name='postdb.uicon'}/{$webdb.updir}/{$postdb.uicon}{/present}" onerror="this.src='__ADMIN__/usererror.png'" height="60" width="auto">
                        <span class="picurltext"></span>
                        <a class="button button-S bor-green uploadbtn" data-img="picurlimg" data-val="picurlval" data-text="picurltext" data-del="picurldel" lay-data="{method:'post',accept:'images',data:'img',field:'picurl'}"><i class="layui-icon">&#xe67c;</i>上传头像</a>
                        <a class="button button-S bor-red picurldel cx-click" data-img="picurlimg" data-val="picurlval" data-type="closdiv" {notpresent name="postdb.uicon"}style="display:none;"{/notpresent}><i class="layui-icon">&#xe67c;</i>删除</a>
                        <input name="uicon" class="ipt picurlval" placeholder="默认值一般为空" type="hidden" value="{$postdb.uicon|default=''}" >
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">姓名</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="uname" class="ipt" placeholder="请输入姓名" {present name="postdb.ucard_yz"}{eq name="postdb.ucard_yz" value="1"}disabled{/eq}{/present} value="{$postdb.uname|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">性别</label>
                    </div>
                    <div class="xs8 xl9">
                        <input name="usex" type="radio" value="1" {eq name="$postdb.usex|default=''" value="1"}checked="checked"{/eq} title="男">
                        <input name="usex" type="radio" value="0" {eq name="$postdb.usex|default='0'" value="0"}checked="checked"{/eq} title="女">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">手机号码</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="uphone" class="ipt" placeholder="请输入手机号码" {present name="postdb.uphone_yz"}{eq name="postdb.uphone_yz" value="1"}disabled{/eq}{/present} value="{$postdb.uphone|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">QQ号码</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="uicq" class="ipt" placeholder="请输入QQ号码" value="{$postdb.uicq|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">出生日期</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" id="ubday" name="ubday" class="ipt cx-time" placeholder="请选择出生日期" value="{$postdb.ubday|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">身份证号</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="ucard" class="ipt" {present name="postdb.ucard_yz"}{eq name="postdb.ucard_yz" value="1"}disabled{/eq}{/present} placeholder="请输入身份证号" value="{$postdb.ucard|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-10">
                    <div class="x3 t-r">
                        <label class="lab">所在城市</label>
                    </div>
                    <div class="xs8 xl9">
                        <div class="cx-input-tabel">
                            {empty name="postdb.ucity"}
                            <select class='cx-china-select' name="ucity[1]" lay-filter="chinacode" data-leve='1' data-name="ucity" data-class="don" data-type="num">
                                <option value="">请选择省份</option>
                                <option value="110000">北京</option>
                                <option value="120000">天津</option>
                                <option value="130000">河北省</option>
                                <option value="140000">山西省</option>
                                <option value="150000">内蒙古自治区</option>
                                <option value="210000">辽宁省</option>
                                <option value="220000">吉林省</option>
                                <option value="230000">黑龙江省</option>
                                <option value="310000">上海</option>
                                <option value="320000">江苏省</option>
                                <option value="330000">浙江省</option>
                                <option value="340000">安徽省</option>
                                <option value="350000">福建省</option>
                                <option value="360000">江西省</option>
                                <option value="370000">山东省</option>
                                <option value="410000">河南省</option>
                                <option value="420000">湖北省</option>
                                <option value="430000">湖南省</option>
                                <option value="440000">广东省</option>
                                <option value="450000">广西壮族自治区</option>
                                <option value="460000">海南省</option>
                                <option value="500000">重庆</option>
                                <option value="510000">四川省</option>
                                <option value="520000">贵州省</option>
                                <option value="530000">云南省</option>
                                <option value="540000">西藏自治区</option>
                                <option value="610000">陕西省</option>
                                <option value="620000">甘肃省</option>
                                <option value="630000">青海省</option>
                                <option value="640000">宁夏回族自治区</option>
                                <option value="650000">新疆维吾尔自治区</option>
                                <option value="710000">台湾</option>
                                <option value="810000">香港特别行政区</option>
                                <option value="820000">澳门特别行政区</option>
                            </select>
                            {else /}
                            {volist name="postdb.ucity" id="cx" key="k"}
                            <select class='cx-china-select' name="ucity[{$k}]" lay-filter="chinacode" data-th="{$cx}" data-leve='{$k}' data-name="ucity" data-class="don" data-type="num"></select>
                            {/volist}
                            <script>
                                $('.cx-china-select').each(function () {
                                    var o = this,
                                        d = $(o).data();
                                    if(d.leve == 1){
                                        var x = '省份';
                                    }
                                    if(d.leve == 2){
                                        var x = '市';
                                    }
                                    if(d.leve == 3){
                                        var x = '县/区';
                                    }
                                    if(d.leve == 4){
                                        var x = "乡/镇/街道";
                                    }
                                    $.ajax({
                                        async:false,
                                        type: "post",
                                        dataType: "json",
                                        data: {zoneid:d.th,class:'this',type:d.type},
                                        url: "/api/chinacode.html",
                                        success:function (res) {
                                            if(res.code == '1'){
                                                var sele = res.dondata;
                                                $(o).html("<option value=''>请选择"+ x +"</option>");
                                                for(var i in sele){
                                                    if(d.th == sele[i].zoneid){
                                                        $(o).append("<option value='"+sele[i].zoneid+"' selected='selected'>"+sele[i].zonename+"</option>");
                                                    }else{
                                                        $(o).append("<option value='"+sele[i].zoneid+"'>"+sele[i].zonename+"</option>");
                                                    }
                                                }
                                            }
                                        }
                                    });
                                })
                            </script>
                            {/empty}
                        </div>
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">详细地址</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="uaddress" class="ipt" placeholder="请输入联系地址" value="{$postdb.uaddress|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab">个性签名</label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="text" name="ugraph" class="ipt" placeholder="请填写个性签名" value="{$postdb.ugraph|default=''}">
                    </div>
                </div>
                <h2 class="t-c b-b t-gray t-18 mb-20">健康档案 </h2>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">年龄(<span class="t-red">*</span>)</label></div>
                    <div class="xs7 xl11">
                        <select id="nianling" name="archives[nianling]" lay-filter="nianling">
                            <option value=''>请选择年龄</option>
                            <option value="20-25岁" {eq name="postdb.archives.nianling|default=''" value="20-25岁" }selected="selected" {/eq}>20-25岁</option>
                            <option value="26-30岁" {eq name="postdb.archives.nianling|default=''" value="26-30岁" }selected="selected" {/eq}>26-30岁</option>
                            <option value="31-35岁" {eq name="postdb.archives.nianling|default=''" value="31-35岁" }selected="selected" {/eq}>31-35岁</option>
                            <option value="36-40岁" {eq name="postdb.archives.nianling|default=''" value="36-40岁" }selected="selected" {/eq}>36-40岁</option>
                            <option value="41-45岁" {eq name="postdb.archives.nianling|default=''" value="41-45岁" }selected="selected" {/eq}>41-45岁</option>
                            <option value="46-50岁" {eq name="postdb.archives.nianling|default=''" value="46-50岁" }selected="selected" {/eq}>46-50岁</option>
                            <option value="51-55岁" {eq name="postdb.archives.nianling|default=''" value="51-55岁" }selected="selected" {/eq}>51-55岁</option>
                            <option value="56-60岁" {eq name="postdb.archives.nianling|default=''" value="56-60岁" }selected="selected" {/eq}>56-60岁</option>
                            <option value="61-65岁" {eq name="postdb.archives.nianling|default=''" value="61-65岁" }selected="selected" {/eq}>61-65岁</option>
                            <option value="66-70岁" {eq name="postdb.archives.nianling|default=''" value="66-70岁" }selected="selected" {/eq}>66-70岁</option>
                            <option value="70岁以上" {eq name="postdb.archives.nianling|default=''" value="70岁以上" }selected="selected" {/eq}>70岁以上</option>
                        </select>
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">身高(<span class='t-red'>*</span>)</label></div>
                    <div class="xs7 xl11">
                        <div class="cx-input-tabel">
                            <input type="text" name="archives[shengao]" placeholder="请输入身高" required lay-verify="required" class="ipt" value="{$postdb.archives.shengao|default=''}">
                            <span class="cx-input-fl">CM</span>
                        </div>
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">体重(<span class='t-red'>*</span>)</label></div>
                    <div class="xs7 xl11">
                        <div class="cx-input-tabel">
                            <input type="text" name="archives[tizhong]" placeholder="请输入体重" required lay-verify="required" class="ipt" value="{$postdb.archives.tizhong|default=''}">
                            <span class="cx-input-fl">KG</span>
                        </div>
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">您有坚持体育锻炼吗</label></div>
                    <div class="xs7 xl11">
                        <input name="archives[duanlian]" value="有" {eq name="postdb.archives.duanlian|default='有'" value="有"}checked="checked" {/eq} type="radio" title="有" >
                        <input name="archives[duanlian]" value="没有" {eq name="postdb.archives.duanlian|default='有'" value="没有" }checked="checked" {/eq} type="radio" title="没有" >
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">何种体育项目</label></div>
                    <div class="xs7 xl11">
                        <input name="archives[xiangmu][]" value="游泳" {if isset($postdb['archives']['xiangmu']) && in_array('游泳',$postdb['archives']['xiangmu'])}checked{/if} type="checkbox" title="游泳" lay-skin="primary">
                        <input name="archives[xiangmu][]" value="跑步" {if isset($postdb['archives']['xiangmu']) && in_array('跑步',$postdb['archives']['xiangmu'])}checked{/if} type="checkbox" title="跑步" lay-skin="primary">
                        <input name="archives[xiangmu][]" value="健身" {if isset($postdb['archives']['xiangmu']) && in_array('健身',$postdb['archives']['xiangmu'])}checked{/if} type="checkbox" title="健身" lay-skin="primary">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">练习了多长时间</label></div>
                    <div class="xs7 xl11">
                        <input name="archives[shichang]" value="半年以下" {eq name="postdb.archives.shichang|default=''" value="半年以下"}checked="checked" {/eq} type="radio" title="半年以下" >
                        <input name="archives[shichang]" value="半年" {eq name="postdb.archives.shichang|default=''" value="半年"}checked="checked" {/eq} type="radio" title="半年" >
                        <input name="archives[shichang]" value="一年" {eq name="postdb.archives.shichang|default=''" value="一年"}checked="checked" {/eq} type="radio" title="一年" >
                        <input name="archives[shichang]" value="三年" {eq name="postdb.archives.shichang|default=''" value="三年"}checked="checked" {/eq} type="radio" title="三年" >
                        <input name="archives[shichang]" value="三年以上" {eq name="postdb.archives.shichang|default=''" value="三年以上"}checked="checked" {/eq} type="radio" title="三年以上" >
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">您大概能在何时练习瑜伽</label></div>
                    <div class="xs7 xl11">
                        <input name="archives[shijian][]" value="上午" {if isset($postdb['archives']['shijian']) && in_array('上午',$postdb['archives']['shijian'])}checked{/if} type="checkbox" title="上午" lay-skin="primary">
                        <input name="archives[shijian][]" value="中午" {if isset($postdb['archives']['shijian']) && in_array('中午',$postdb['archives']['shijian'])}checked{/if} type="checkbox" title="中午" lay-skin="primary">
                        <input name="archives[shijian][]" value="下午" {if isset($postdb['archives']['shijian']) && in_array('下午',$postdb['archives']['shijian'])}checked{/if} type="checkbox" title="下午" lay-skin="primary">
                        <input name="archives[shijian][]" value="晚上" {if isset($postdb['archives']['shijian']) && in_array('晚上',$postdb['archives']['shijian'])}checked{/if} type="checkbox" title="晚上" lay-skin="primary">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">你通常一周能练习几次</label></div>
                    <div class="xs7 xl11">
                        <input name="archives[touzi]" value="1次" {eq name="postdb.archives.touzi|default=''" value="1次"}checked="checked" {/eq} type="radio" title="1次" >
                        <input name="archives[touzi]" value="2次" {eq name="postdb.archives.touzi|default=''" value=" 2次" }checked="checked"{/eq} type="radio" title="2次">
                        <input name="archives[touzi]" value="3次" {eq name="postdb.archives.touzi|default=''" value="3次" }checked="checked" {/eq} type="radio" title="3次" >
                        <input name="archives[touzi]" value="4次" {eq name="postdb.archives.touzi|default=''" value="4次"}checked="checked" {/eq} type="radio" title="4次" >
                        <input name="archives[touzi]" value="5次" {eq name="postdb.archives.touzi|default=''" value="5次"}checked="checked" {/eq} type="radio" title="5次" >
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">请描述您现在身体健康状况</label></div>
                    <div class="xs7 xl11">
                        <input name="archives[jiankang][]" value="体力不足" {if isset($postdb['archives']['jiankang']) && in_array('体力不足',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="体力不足" lay-skin="primary">
                        <input name="archives[jiankang][]" value="头晕头痛" {if isset($postdb['archives']['jiankang']) && in_array('头晕头痛',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="头晕头痛" lay-skin="primary">
                        <input name="archives[jiankang][]" value="皮肤问题" {if isset($postdb['archives']['jiankang']) && in_array('皮肤问题',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="皮肤问题" lay-skin="primary">
                        <input name="archives[jiankang][]" value="脊柱问题" {if isset($postdb['archives']['jiankang']) && in_array('脊柱问题',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="脊柱问题" lay-skin="primary">
                        <input name="archives[jiankang][]" value="肠胃问题" {if isset($postdb['archives']['jiankang']) && in_array('肠胃问题',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="肠胃问题" lay-skin="primary">
                        <input name="archives[jiankang][]" value="内分泌失调" {if isset($postdb['archives']['jiankang']) && in_array('内分泌失调',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="内分泌失调" lay-skin="primary">
                        <input name="archives[jiankang][]" value="胆固醇" {if isset($postdb['archives']['jiankang']) && in_array('胆固醇',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="胆固醇" lay-skin="primary">
                        <input name="archives[jiankang][]" value="糖尿病" {if isset($postdb['archives']['jiankang']) && in_array('糖尿病',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="糖尿病" lay-skin="primary">
                        <input name="archives[jiankang][]" value="心脏病" {if isset($postdb['archives']['jiankang']) && in_array('心脏病',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="心脏病" lay-skin="primary">
                        <input name="archives[jiankang][]" value="失眠" {if isset($postdb['archives']['jiankang']) && in_array('失眠',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="失眠" lay-skin="primary">
                        <input name="archives[jiankang][]" value="哮喘" {if isset($postdb['archives']['jiankang']) && in_array('哮喘',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="哮喘" lay-skin="primary">
                        <input name="archives[jiankang][]" value="风湿关节炎" {if isset($postdb['archives']['jiankang']) && in_array('风湿关节炎',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="风湿关节炎" lay-skin="primary">
                        <input name="archives[jiankang][]" value="肝脏问题" {if isset($postdb['archives']['jiankang']) && in_array('肝脏问题',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="肝脏问题" lay-skin="primary">
                        <input name="archives[jiankang][]" value="肾脏问题" {if isset($postdb['archives']['jiankang']) && in_array('肾脏问题',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="肾脏问题" lay-skin="primary">
                        <input name="archives[jiankang][]" value="气管问题" {if isset($postdb['archives']['jiankang']) && in_array('气管问题',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="气管问题" lay-skin="primary">
                        <input name="archives[jiankang][]" value="血压" {if isset($postdb['archives']['jiankang']) && in_array('血压',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="血压" lay-skin="primary">
                        <input name="archives[jiankang][]" value="痛经" {if isset($postdb['archives']['jiankang']) && in_array('痛经',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="痛经" lay-skin="primary">
                        <input name="archives[jiankang][]" value="痔疮" {if isset($postdb['archives']['jiankang']) && in_array('痔疮',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="痔疮" lay-skin="primary">
                        <input name="archives[jiankang][]" value="便秘" {if isset($postdb['archives']['jiankang']) && in_array('便秘',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="便秘" lay-skin="primary">
                        <input name="archives[jiankang][]" value="贫血" {if isset($postdb['archives']['jiankang']) && in_array('贫血',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="贫血" lay-skin="primary">
                        <input name="archives[jiankang][]" value="鼻炎" {if isset($postdb['archives']['jiankang']) && in_array('鼻炎',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="鼻炎" lay-skin="primary">
                        <input name="archives[jiankang][]" value="甲亢" {if isset($postdb['archives']['jiankang']) && in_array('甲亢',$postdb['archives']['jiankang'])}checked{/if} type="checkbox" title="甲亢" lay-skin="primary">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">其它症状</label></div>
                    <div class="xs7 xl11">
                        <input type="text" name="archives[zhengzhuang]" placeholder="请输入其它症状" class="ipt" value="{$postdb.archives.zhengzhuang|default=''}">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="xs3 t-r"><label class="lab">您练习瑜伽的目的是</label></div>
                    <div class="xs7 xl11">
                        <input name="archives[mudi][]" value="减脂塑身" {if isset($postdb['archives']['mudi']) && in_array('减脂塑身',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="减脂塑身" lay-skin="primary">
                        <input name="archives[mudi][]" value="理疗脊柱" {if isset($postdb['archives']['mudi']) && in_array('理疗脊柱',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="理疗脊柱" lay-skin="primary">
                        <input name="archives[mudi][]" value="调理肠胃" {if isset($postdb['archives']['mudi']) && in_array('调理肠胃',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="调理肠胃" lay-skin="primary">
                        <input name="archives[mudi][]" value="缓解压力" {if isset($postdb['archives']['mudi']) && in_array('缓解压力',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="缓解压力" lay-skin="primary">
                        <input name="archives[mudi][]" value="挺拨身体" {if isset($postdb['archives']['mudi']) && in_array('挺拨身体',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="挺拨身体" lay-skin="primary">
                        <input name="archives[mudi][]" value="平衡内分泌" {if isset($postdb['archives']['mudi']) && in_array('平衡内分泌',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="平衡内分泌" lay-skin="primary">
                        <input name="archives[mudi][]" value="降低血糖" {if isset($postdb['archives']['mudi']) && in_array('降低血糖',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="降低血糖" lay-skin="primary">
                        <input name="archives[mudi][]" value="排除毒素" {if isset($postdb['archives']['mudi']) && in_array('排除毒素',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="排除毒素" lay-skin="primary">
                        <input name="archives[mudi][]" value="产前练习" {if isset($postdb['archives']['mudi']) && in_array('产前练习',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="产前练习" lay-skin="primary">
                        <input name="archives[mudi][]" value="柔韧身体" {if isset($postdb['archives']['mudi']) && in_array('柔韧身体',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="柔韧身体" lay-skin="primary">
                        <input name="archives[mudi][]" value="心情愉悦" {if isset($postdb['archives']['mudi']) && in_array('心情愉悦',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="心情愉悦" lay-skin="primary">
                        <input name="archives[mudi][]" value="延缓衰老" {if isset($postdb['archives']['mudi']) && in_array('延缓衰老',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="延缓衰老" lay-skin="primary">
                        <input name="archives[mudi][]" value="加强记忆力" {if isset($postdb['archives']['mudi']) && in_array('加强记忆力',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="加强记忆力" lay-skin="primary">
                        <input name="archives[mudi][]" value="远离负面情绪" {if isset($postdb['archives']['mudi']) && in_array('远离负面情绪',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="远离负面情绪" lay-skin="primary">
                        <input name="archives[mudi][]" value="避免骨质疏松" {if isset($postdb['archives']['mudi']) && in_array('避免骨质疏松',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="避免骨质疏松" lay-skin="primary">
                        <input name="archives[mudi][]" value="增强淋巴功能" {if isset($postdb['archives']['mudi']) && in_array('增强淋巴功能',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="增强淋巴功能" lay-skin="primary">
                        <input name="archives[mudi][]" value="改善睡眠" {if isset($postdb['archives']['mudi']) && in_array('改善睡眠',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="改善睡眠" lay-skin="primary">
                        <input name="archives[mudi][]" value="增强免疫力" {if isset($postdb['archives']['mudi']) && in_array('增强免疫力',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="增强免疫力" lay-skin="primary">
                        <input name="archives[mudi][]" value="良好的空间感" {if isset($postdb['archives']['mudi']) && in_array('良好的空间感',$postdb['archives']['mudi'])}checked{/if} type="checkbox" title="良好的空间感" lay-skin="primary">
                    </div>
                </div>
                <div class="cx-fex-l mb-15">
                    <div class="x3 t-r">
                        <label class="lab"></label>
                    </div>
                    <div class="xs8 xl9">
                        <input type="hidden" name="id" class="layui-input" value="{$postdb.id|default=''}">
                        <input type="hidden" name="uid" class="layui-input" value="{$postdb.uid|default=''}">
                        <button class="button bg-blue" lay-submit lay-filter="button">确认提交</button>
                    </div>
                </div>
            </form>
        </fieldset>
    </div>
</div>
<div style="height: 20px; overflow: hidden"></div>

<script>
    layui.config({
        base: '__ADMIN__/js/'
    }).use('app');
    layui.define(['laydate','upload'], function(exports){
        var laydate = layui.laydate,
            layupload = layui.upload;
        laydate.render({
            elem: '#seefanwei',
            range: '---'
        });
        var uplogo = layupload.render({
            elem: '.uploadbtn',
            url:"{:url('Uploads/index')}",
            before: function(obj){
                layer.load();
            },
            done: function(res, index, upload){
                var cx = this.item.context.dataset;
                layer.closeAll('loading');
                if(res.code != 0){
                    $('.'+cx.text).html('<span style="color: #FF5722;">上传失败</span> <a class="btn size-S btn-primary-outline reload">重试</a>');
                    $('.'+cx.text).find('.reload').on('click', function(){
                        uplogo.upload();
                    });
                    return layer.msg(res.msg,{time: 2000});
                }
                $('.'+cx.img).attr('src','/'+ res.src);
                $('.'+cx.val).val(res.src);
                $('.'+cx.del).show();
                $('.'+cx.text).hide();
                return layer.msg(res.msg,{time: 2000})
            },
            error: function(){
                var cx = this.item.context.dataset;
                layer.closeAll('loading');
                $('.'+cx.text).html('<span style="color: #FF5722;">上传失败</span> <a class="btn size-S btn-primary-outline reload">重试</a>');
                $('.'+cx.text).find('.reload').on('click', function(){
                    uplogo.upload();
                });
            }
        });
        var dfeilds = layupload.render({
            elem: '.dfeilds',
            url:"{:url('Uploads/index')}",
            multiple: true,
            done: function(res, index, upload){
                var cx = this.item.context.dataset;
                var size = "";
                if(res.size < 0.1 * 1024){                            //小于0.1KB，则转化成B
                    size = res.size.toFixed(2) + "B"
                }else if(res.size < 0.1 * 1024 * 1024){            //小于0.1MB，则转化成KB
                    size = (res.size/1024).toFixed(2) + "KB"
                }else if(res.size < 0.1 * 1024 * 1024 * 1024){        //小于0.1GB，则转化成MB
                    size = (res.size/(1024 * 1024)).toFixed(2) + "MB"
                }else{                                            //其他转化成GB
                    size = (res.size/(1024 * 1024 * 1024)).toFixed(2) + "GB"
                }
                var sizeStr = size + "";                        //转成字符串
                var sizes = sizeStr.indexOf(".");                    //获取小数点处的索引
                var dou = sizeStr.substr(sizes + 1 ,2)            //获取小数点后两位的值
                if(dou == "00"){                                //判断后两位是否为00，如果是则删除00
                    size = sizeStr.substring(0, sizes) + sizeStr.substr(sizes + 3, 2)
                }
                if(cx.acc == 'img'){
                    var imgsee =  '<td><img src="/'+ res.src +'" height="100" width="auto">'+ res.title +'<input type="hidden" name="'+ cx.valname +'['+ res.title +']" class="ipt" value="'+ res.src +'"></td>';
                }else{
                    var imgsee =  '<td>'+ res.title +'<input type="hidden" name="'+ cx.valname +'['+ res.title +']" class="ipt" value="'+ res.src +'"></td>';
                }
                var tr = $(['<tr id="upload-'+ index +'">',
                    imgsee,
                    '<td>'+ res.msg +'</td>',
                    '<td class="t-c">'+ size +'</td>',
                    '<td class="t-c">',
                    '<button class="button bor-red m-reload layui-hide">重传</button>',
                    '<button class="button bg-red m-delete">删除</button>',
                    '</td>',
                    '</tr>'].join(''));
                if(res.code != 0){ //上传成功
                    var tr = $('#'+cx.tabel).find('tr#upload-'+ index),
                        tds = tr.children();
                    tds.eq(3).find('.m-reload').removeClass('layui-hide'); //显示重传
                }
                tr.find('.m-delete').on('click', function(){
                    tr.remove();
                    dfeilds.config.elem.next()[0].value = ''; //清空 input file 值，以免删除后出现同名文件不可选
                });
                $('#'+cx.tabd).append(tr);
                this.error(index, upload);
            },
            error: function(index, upload){
                var cx = this.item.context.dataset;
                var tr = $('#'+cx.tabel).find('tr#upload-'+ index),
                    tds = tr.children();
                tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
                tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
            }
        });
    });
</script>
{include file="public/footer" /}